package com.luyishi.entity;

import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * @Author Lenovo
 * @Date: 2020/9/1 15:52
 */
@Component
public class Book {

    private int bId;
    private String bookName;
    private String author;
    private BigDecimal price;
    private int stock;
    private int sales;
    private String img_path = "static/img/default.jpg";

    public Book() {}

    public Book(int bId, String bookName, String author, BigDecimal price, int stock, int sales) {
        this.bId = bId;
        this.bookName = bookName;
        this.author = author;
        this.price = price;
        this.stock = stock;
        this.sales = sales;
    }

    @Override
    public String toString() {
        return "book{" +
                "bId=" + bId +
                ", bookName='" + bookName + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", stock=" + stock +
                ", sales=" + sales +
                ", img_path='" + img_path + '\'' +
                '}';
    }

    public int getBId() {
        return bId;
    }

    public void setBId(int bId) {
        this.bId = bId;
    }

    public String getBookName() {
        return bookName;
    }

    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public int getStock() {
        return stock;
    }

    public void setStock(int stock) {
        this.stock = stock;
    }

    public int getSales() {
        return sales;
    }

    public void setSales(int sales) {
        this.sales = sales;
    }

    public String getImg_path() {
        return img_path;
    }

    public void setImg_path(String img_path) {
        this.img_path = img_path;
    }
}
